<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::TimeTrigger类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1_time_trigger.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pri-methods">Private 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="classpcl_1_1_time_trigger-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::TimeTrigger类 参考<div class="ingroups"><a class="el" href="group__common.html">Common components</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Timer class that invokes registered callback methods periodically.  
 <a href="classpcl_1_1_time_trigger.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="time__trigger_8h_source.html">time_trigger.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a62d0e487f33502de2215f0dfb9515ec1"><td class="memItemLeft" align="right" valign="top"><a id="a62d0e487f33502de2215f0dfb9515ec1"></a>
typedef boost::function&lt; void() &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>callback_type</b></td></tr>
<tr class="separator:a62d0e487f33502de2215f0dfb9515ec1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ae54af58e41c9058706e6872984d5def6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_time_trigger.html#ae54af58e41c9058706e6872984d5def6">TimeTrigger</a> (double interval_seconds, const callback_type &amp;callback)</td></tr>
<tr class="memdesc:ae54af58e41c9058706e6872984d5def6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Timer class that calls a callback method periodically. Due to possible blocking calls, only one callback method can be registered per instance.  <a href="classpcl_1_1_time_trigger.html#ae54af58e41c9058706e6872984d5def6">更多...</a><br /></td></tr>
<tr class="separator:ae54af58e41c9058706e6872984d5def6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c3fbb076905e57dca53ad35a739ce6c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_time_trigger.html#a6c3fbb076905e57dca53ad35a739ce6c">TimeTrigger</a> (double interval_seconds=1.0)</td></tr>
<tr class="memdesc:a6c3fbb076905e57dca53ad35a739ce6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Timer class that calls a callback method periodically. Due to possible blocking calls, only one callback method can be registered per instance.  <a href="classpcl_1_1_time_trigger.html#a6c3fbb076905e57dca53ad35a739ce6c">更多...</a><br /></td></tr>
<tr class="separator:a6c3fbb076905e57dca53ad35a739ce6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed6eb24553ff7cc936df250a27a9b4c4"><td class="memItemLeft" align="right" valign="top"><a id="aed6eb24553ff7cc936df250a27a9b4c4"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_time_trigger.html#aed6eb24553ff7cc936df250a27a9b4c4">~TimeTrigger</a> ()</td></tr>
<tr class="memdesc:aed6eb24553ff7cc936df250a27a9b4c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:aed6eb24553ff7cc936df250a27a9b4c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abae596d0abac17b4a1b9377f08eb88d7"><td class="memItemLeft" align="right" valign="top">boost::signals2::connection&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_time_trigger.html#abae596d0abac17b4a1b9377f08eb88d7">registerCallback</a> (const callback_type &amp;callback)</td></tr>
<tr class="memdesc:abae596d0abac17b4a1b9377f08eb88d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">registeres a callback  <a href="classpcl_1_1_time_trigger.html#abae596d0abac17b4a1b9377f08eb88d7">更多...</a><br /></td></tr>
<tr class="separator:abae596d0abac17b4a1b9377f08eb88d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4e77e6e0701b795cd84404d50061c90"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_time_trigger.html#aa4e77e6e0701b795cd84404d50061c90">setInterval</a> (double interval_seconds)</td></tr>
<tr class="memdesc:aa4e77e6e0701b795cd84404d50061c90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets the timer interval  <a href="classpcl_1_1_time_trigger.html#aa4e77e6e0701b795cd84404d50061c90">更多...</a><br /></td></tr>
<tr class="separator:aa4e77e6e0701b795cd84404d50061c90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8a92d56c3660ca8917a230466905751"><td class="memItemLeft" align="right" valign="top"><a id="ab8a92d56c3660ca8917a230466905751"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_time_trigger.html#ab8a92d56c3660ca8917a230466905751">start</a> ()</td></tr>
<tr class="memdesc:ab8a92d56c3660ca8917a230466905751"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the Trigger. <br /></td></tr>
<tr class="separator:ab8a92d56c3660ca8917a230466905751"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3655d6534ed86611eab6a0e73f2528fc"><td class="memItemLeft" align="right" valign="top"><a id="a3655d6534ed86611eab6a0e73f2528fc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_time_trigger.html#a3655d6534ed86611eab6a0e73f2528fc">stop</a> ()</td></tr>
<tr class="memdesc:a3655d6534ed86611eab6a0e73f2528fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop the Trigger. <br /></td></tr>
<tr class="separator:a3655d6534ed86611eab6a0e73f2528fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private 成员函数</h2></td></tr>
<tr class="memitem:aa3b94feb854cf465e25c30f250bec40a"><td class="memItemLeft" align="right" valign="top"><a id="aa3b94feb854cf465e25c30f250bec40a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>thread_function</b> ()</td></tr>
<tr class="separator:aa3b94feb854cf465e25c30f250bec40a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a93657b1a617e2b5745a5411bb56fe321"><td class="memItemLeft" align="right" valign="top"><a id="a93657b1a617e2b5745a5411bb56fe321"></a>
boost::signals2::signal&lt; void() &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>callbacks_</b></td></tr>
<tr class="separator:a93657b1a617e2b5745a5411bb56fe321"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c1f4bf5b4c8dce7221582fc65fa6f6f"><td class="memItemLeft" align="right" valign="top"><a id="a4c1f4bf5b4c8dce7221582fc65fa6f6f"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>interval_</b></td></tr>
<tr class="separator:a4c1f4bf5b4c8dce7221582fc65fa6f6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee1609cd81218c5c4b5fc11ebd9f786a"><td class="memItemLeft" align="right" valign="top"><a id="aee1609cd81218c5c4b5fc11ebd9f786a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>quit_</b></td></tr>
<tr class="separator:aee1609cd81218c5c4b5fc11ebd9f786a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85b9407e1e2f831758d05e9fd65ee14a"><td class="memItemLeft" align="right" valign="top"><a id="a85b9407e1e2f831758d05e9fd65ee14a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>running_</b></td></tr>
<tr class="separator:a85b9407e1e2f831758d05e9fd65ee14a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6d977db4b942099a64ce539d6a3f99c"><td class="memItemLeft" align="right" valign="top"><a id="ac6d977db4b942099a64ce539d6a3f99c"></a>
boost::thread&#160;</td><td class="memItemRight" valign="bottom"><b>timer_thread_</b></td></tr>
<tr class="separator:ac6d977db4b942099a64ce539d6a3f99c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa020b8a3254edf6ab02658271487e0b4"><td class="memItemLeft" align="right" valign="top"><a id="aa020b8a3254edf6ab02658271487e0b4"></a>
boost::condition_variable&#160;</td><td class="memItemRight" valign="bottom"><b>condition_</b></td></tr>
<tr class="separator:aa020b8a3254edf6ab02658271487e0b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac036797ef31d22e52b1986d42760ddb"><td class="memItemLeft" align="right" valign="top"><a id="aac036797ef31d22e52b1986d42760ddb"></a>
boost::mutex&#160;</td><td class="memItemRight" valign="bottom"><b>condition_mutex_</b></td></tr>
<tr class="separator:aac036797ef31d22e52b1986d42760ddb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>Timer class that invokes registered callback methods periodically. </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="ae54af58e41c9058706e6872984d5def6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae54af58e41c9058706e6872984d5def6">&#9670;&nbsp;</a></span>TimeTrigger() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pcl::TimeTrigger::TimeTrigger </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>interval_seconds</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const callback_type &amp;&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Timer class that calls a callback method periodically. Due to possible blocking calls, only one callback method can be registered per instance. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">interval_seconds</td><td>interval in seconds </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>callback to be invoked periodically </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6c3fbb076905e57dca53ad35a739ce6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c3fbb076905e57dca53ad35a739ce6c">&#9670;&nbsp;</a></span>TimeTrigger() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pcl::TimeTrigger::TimeTrigger </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>interval_seconds</em> = <code>1.0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Timer class that calls a callback method periodically. Due to possible blocking calls, only one callback method can be registered per instance. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">interval_seconds</td><td>interval in seconds </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="abae596d0abac17b4a1b9377f08eb88d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abae596d0abac17b4a1b9377f08eb88d7">&#9670;&nbsp;</a></span>registerCallback()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boost::signals2::connection pcl::TimeTrigger::registerCallback </td>
          <td>(</td>
          <td class="paramtype">const callback_type &amp;&#160;</td>
          <td class="paramname"><em>callback</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>registeres a callback </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>callback function to the list of callbacks. signature has to be boost::function&lt;void()&gt; </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>connection the connection, which can be used to disable/enable and remove callback from list </dd></dl>

</div>
</div>
<a id="aa4e77e6e0701b795cd84404d50061c90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4e77e6e0701b795cd84404d50061c90">&#9670;&nbsp;</a></span>setInterval()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pcl::TimeTrigger::setInterval </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>interval_seconds</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resets the timer interval </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">interval_seconds</td><td>interval in seconds </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>common/include/pcl/common/<a class="el" href="time__trigger_8h_source.html">time_trigger.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="classpcl_1_1_time_trigger.html">TimeTrigger</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
